package com.zhouyu;

import com.zhouyu.seven.UserServiceSeven;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test07 {
	public static void main(String[] args) {

		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
		UserServiceSeven userServiceSeven = (UserServiceSeven) context.getBean("userServiceSeven");
		userServiceSeven.test();
		/**
		 * 总结一遍 6层筛选 对应这个url
		 * https://www.processon.com/view/link/5f8fdfa8e401fd06fd984f20
		 * 1、首先处理 @Value
		 * 中间步骤、根据类型把所有的beanName找出来
		 * 2、SimpleAutowireCandidateResolver 中看 autowireCandidate 是否是 true
		 * 3、GenericTypeAwareAutowireCandidateResolver 查看泛型的一些匹配
		 * 4、QualifierAnnotationAutowireCandidateResolver 是否匹配
		 * 中间步骤 如果是多个再判断
		 * 5、查看是否由 Primary设置的
		 * 6、获取优先级最高的  Priority
		 *
		 */
	}
}
